<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>出差报销单</title>
    <link rel="stylesheet" href="../../../css/aui.css" />
    <link rel="stylesheet" href="../../../css/my/apply.css" />
    <link rel="stylesheet" href="../../../script/widget/Zepto/dropload.css" />
    <style>
        .dropload-down {height: 0;}
    </style>
</head>

<body style="cursor: pointer">
    <div class="aui-tab" id="a">
        <div class="aui-tab-item aui-active">我的</div>
        <div class="aui-tab-item">待我审批的</div>
    </div>
    <div id="tab">
    </div>
</body>

</html>
<script type="text/javascript" src="../../../script/aui/api.js"></script>
<script type="text/javascript" src="../../../script/extend/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../../script/extend/doT.min.js"></script>
<script type="text/javascript" src="../../../script/extend/picker.min.js"></script>
<script type="text/javascript" src="../../../script/widget/Zepto/dropload.min.js"></script>
<script type="text/javascript" src="../../../script/common.js"></script>
<script type="text/javascript" src="../../../script/config.js"></script>
<script type="text/javascript" src="../../../service/index/order.js"></script>
<!--列表模板 start-->
<script id="list_tpl" type="text/x-dot-template">
    {{ for(var prop in it) { }}
	<div class="apply_style" style="margin-top: 10px;">
        <div class="icon_order travel_info" data-id="{{= it[prop]['id']}}">
            <i class="iconfont icon-feiji2" style="font-size: 1.5rem;color: #3CB0D6;float: left;"></i>
            <span class="color-blue">报销单号：{{= it[prop]['expense_code'] }}</span>
            {{ if(it[prop]['status'] == '未审批'){ }}
            <span class="await">{{= it[prop]['status'] }}</span>
            {{ }else if(it[prop]['status'] == '已通过'){ }}
                {{ if(it[prop]['finance_status'] == '未报销'){ }}
                <span class="pass">{{= it[prop]['status'] }}</span>
                {{ }else if(it[prop]['finance_status'] == '已报销'){ }}
                <span class="pass">{{= it[prop]['finance_status'] }}</span>
                {{ }else if(it[prop]['finance_status'] == '作废'){ }}
                <span class="pass" style="color: gray;">{{= it[prop]['finance_status'] }}</span>
                {{ } }}
            {{ }else if(it[prop]['status'] == '已驳回'){ }}
            <span class="await">{{= it[prop]['status'] }}</span>
            {{ }else if(it[prop]['status'] == '审批中'){ }}
            <span class="await">{{= it[prop]['status'] }}</span>
            {{ }else if(it[prop]['status'] == '已取消'){ }}
            <span class="await" style="color: gray;">{{= it[prop]['status'] }}</span>
            {{ } }}
        </div>
        <p class="font_color">时间：{{= it[prop]['create_time'] }}</p>
        <p class="font_color">审批人：{{= it[prop]['approver_name'] }}</p>
        <p class="font_color">申请人：{{= it[prop]['book_user'].user_name }}</p>
        {{ if(it[prop]['status'] == '未审批'){ }}
            <div class="font_color" style="text-align: right;">
            {{ if(it[prop]['approve_info']['is_current'] == 1){ }}

            {{ } }}
            {{ if(it[prop]['approve_info']['is_mine'] == 1){ }}
                <div class="aui-btn aui-btn-info" style="margin-left: 1rem;" onclick="examineCancel({{= it[prop]['id'] }})">取消</div>
            {{ } }}
            </div>
        {{ } }}

        {{ if(it[prop]['finance_status'] == '未报销' && it[prop]['status'] == '已通过' && it[prop]['approve_info']['is_mine'] == 1){ }}
        <div class="font_color" style="text-align: right;">
            <div class="aui-btn aui-btn-info" onclick="examineInvalid({{= it[prop]['id'] }})">作废</div>
        </div>

        {{ } }}
    </div>

    {{ } }}
</script>
<!--列表模板 end-->
<script type="text/javascript">
    apiready = function() {
        api.parseTapmode();

        new order({
            orderName            : '补助单'                             //xx单名称
            ,mineListInterface   : Config.travel.expenseListMine        //我的补助单接口
            ,otherListInterface  : Config.travel.expenseListApprove     //待我审批的补助单接口
            ,cancelInterface     : Config.travel.expenseCancel          //取消接口
            ,invalidInterface    : Config.travel.expenseInvalid         //作废接口
            ,winName             : 'travel_expense_info_win'           //打开新窗口的名称
            ,storageId           : 'expense_id'                        //存储storageId的名称
        });
    };
</script>
